home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
commercial
/
visual_inspirations
/
mlm
/
rexx
/
ppageenvelope.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-17
|
3KB
|
105 lines
/*
PPageEnvelope.Rexx
Written By J.L. White
(C) 1993 Merlin's Software
For Use With Mailing List Manager & Professional Page
Print Envelopes From Database
*/
Font = "Times"
FontSize = 15
CR = '0a'x
arg Total
call SetUp
call ppm_PPageToFront()
call MakePages
call PickPrint
call ppm_PPageToBack()
call ppm_New()
exit
SetUp:
FileName = "RAM:MLM.Temp"
ReturnName = "RAM:MLM.Return"
CustomPage = "MLM:Rexx/CustomEnvelope.PPage"
BlankPage = "MLM:Rexx/BlankEnvelope.PPage"
call ppm_New()
call ppm_SetFont(Font)
call ppm_SetStyle(B)
call ppm_SetJustification(0)
call ppm_SetSize(FontSize)
TypeEnvelope = ppm_Inform(2,"Custom Or Generic?","GENERIC","CUSTOM")
if TypeEnvelope = 1 then
ppm_LoadDocument(CustomPage,1,0)
else do
ppm_LoadDocument(BlankPage,1,0)
ppm_ImportText(1,ReturnName)
end
return
MakePages:
TotalPages = Total
BoxA = Box1
do i = 2 to TotalPages
ppm_CopyPage(1,Total+1,1)
end
ppm_GotoPage(1)
Box1 = ppm_CreateBox(3.7173,1.7500,4.4267,1.4667,0)
BoxA = Box1
do i = 2 to TotalPages
ppm_GotoPage(i)
BoxB = ppm_CreateBox(3.7173,1.7500,4.4267,1.4667,0)
ppm_LinkBox(BoxA,BoxB)
BoxA = BoxB
end
ppm_GotoPage(1)
ppm_SelectBox(Box1)
ppm_ImportText(Box1,FileName)
return
PickPrint:
TypePrint=ppm_Inform(2,"Postscript Or Preference Printer","PREFERENCE PRINTER","POSTSCRIPT")
if TypePrint = 1 then call PostPrint
if TypePrint = 0 then call PrefPrint
return
PostPrint:
OutPut = ppm_Inform(3,"Select Type Of Output To Use?","DISK","SER:","PAR:");
if OutPut = 2 then TypeOutPut = "PAR:"
if OutPut = 1 then TypeOutPut = "SER:"
if OutPut = 0 then do
TypeOutPut = ppm_GetUserText(50,"Enter Name For Output File!")
if TypeOutPut = "" then call NoPrint
end
call ppm_SetPSOutput(TypeOutPut)
Manual = ppm_Inform(2,"Manual Feed ON-OFF?","OFF","ON")
call ppm_SetPSManFeed(Manual)
NumCopy = ppm_GetUserText(3,"Enter # Of Copies To Print!")
if NumCopy < 1 then call NoPrint
if NumCopy > 0 then ppm_PrintDocPS(NumCopy,1)
return
PrefPrint:
Eject=ppm_Inform(2,"Eject Page ON-OFF?","OFF","ON")
call ppm_SetDMEject(Eject)
Text = "4"cr"1"cr"2"cr"3"cr"5"cr"6"cr"7"
Density = value(ppm_SelectFromList(" Select Density",1,7,0,Text))
if Density < 1 then call NoPrint
call ppm_SetDMDensity(Density)
NumCopy = ppm_GetUserText(3,"Enter # Of Copies To Print!")
if NumCopy < 1 then call NoPrint
call ppm_PrintDocDM(NumCopy,1)
return
NoPrint:
ppm_Inform(1,"Printing Has Been Cancelled!","OK")
call ppm_PPageToBack()
call ppm_New()
exit
return